﻿@using System.Globalization
@inherits MudComponentBase
@namespace MudBlazor.UnitTests

<style>
    .child1-div {
        background-color: #FFFF00;
        padding: 20px;
        color: black;
    }
</style>

<div class="child1-div">
    Child Component 1
    <MudButton id="childBtn1" OnClick="OnClickChild1Async">Click 1 Child</MudButton>
    <ParameterStateChildComp2 @bind-Counter:get="_counterState.Value" @bind-Counter:set="_counterState.SetValueAsync"/>
    
    <p>Parameter changes 1:</p>
    <div class="parameter-changes1">
        @foreach (var parameterChange in _parameterChangedEvents)
        {
            <p>@($"Counter: {parameterChange.LastValue.ToString(CultureInfo.InvariantCulture)}=>{parameterChange.Value.ToString(CultureInfo.InvariantCulture)} by ")@(parameterChange.IsChildOriginatedChange ? "Child" : "Parent")</p>
        }
    </div>
</div>

